package nn.functions;

public class ActivationFunctionFactory {
	public final static String LINEAR_FUNC = "LIN";
	public final static String HARDLIM_FUNC = "HARDLIM";
	public final static String SIG_FUNC = "SIG";

	public static ActivationFunction getFunction(String type){
		switch (type) {
		case LINEAR_FUNC:
			return new LinerFunction();
		case HARDLIM_FUNC:
			return new HardlimFunction();
		case SIG_FUNC:
			return new SigmoidFunction();
		default:
			throw new RuntimeException("function type not supported");
		}

	}
}
